<template>
  <basic-import :columns="columns"
                :api="api"
                :templateUrl="templateUrl"
                templateName="VehicleImport" />
</template>

<script>
import BasicImport from "./BasicImport";
import { vehicle } from "@/api/index";
export default {
  name: "VehicleImport",
  components: { BasicImport },

  data () {
    return {
      columns: [
        {
          label: "车牌号",
          name: "plateNo"
        },
        {
          label: "购入时间",
          type: "date",
          name: "buyDate"
        },
        {
          label: "保险到期时间",
          name: "insuranceEndDate",
          type: "date"
        },
        {
          label: "车辆品牌",
          name: "brand"
        },
        {
          label: "车型",
          name: "typeName",
          type: "enum",
          enumArr: [
            "半挂车",
            "高栏车",
            "厢式货车",
            "平板车",
            "敞车",
            "冷藏车",
            "面包车",
            "特种车辆",
            "集卡车",
            "其他车型",
            "按载重"
          ]
        },
        {
          label: "车长",
          name: "lengthName",
          type: "enum",
          enumArr: [
            "2.5米",
            "3.8米",
            "4.2米",
            "5.2米",
            "5.8米",
            "6.2米",
            "6.8米",
            "7.2米",
            "7.6米",
            "8米",
            "9.6米",
            "12.5米",
            "13米",
            "15米",
            "17.5米",
            "18米",
            "20米",
            "5吨",
            "8吨",
            "10吨",
            "16吨"
          ]
        },
        {
          label: "座位数",
          name: "seats"
        },
        {
          label: "容积(方)",
          name: "volume"
        },
        {
          label: "载重(吨)",
          name: "loadWeight"
        }
      ],
      api: vehicle,
      templateUrl: "/excelTemplate/车辆信息导入模版.xlsx"
    };
  },
  methods: {}
};
</script>
